notas_acordes = {
    frozenset(['C','E','G']):'CM', 
    frozenset(['C','D#','G']):'Cm', 
    frozenset(['C','D#','F#']):'Cd',
	frozenset(['C#','F','G#']):'C#M',
    frozenset(['C#','E','G#']):'C#m', 
    frozenset(['C#','E','G']):'C#d',
    frozenset(['D','F#','A']):'DM', 
    frozenset(['D','F','A']):'Dm', 
    frozenset(['D','E','A']):'Dd', 
    frozenset(['D#','G','A#']):'D#M', 
	frozenset(['D#','F#','A#']):'D#m', 
    frozenset(['D#','F#','A']):'D#d',
    frozenset(['E','G#','B']):'EM', 
	frozenset(['E','G','B']):'Em', 
    frozenset(['E','F#','B']):'Ed',
	frozenset(['F','A','C']):'FM',
    frozenset(['F','G#','C']):'Fm', 
    frozenset(['F','G#','B']):'Fd',
    frozenset(['F#','A#','C#']):'F#M',
	frozenset(['F#','A','C#']):'F#m',
    frozenset(['F#','A','C']):'F#d',
    frozenset(['G','B','D']):'GM', 
    frozenset(['G','A#','D']):'Gm',
	frozenset(['G','A#','C#']):'Gd',
    frozenset(['G#','C','D#']):'G#M', 
    frozenset(['G#','B','D#']):'G#m',
    frozenset(['G#','B','D']):'G#d',
	frozenset(['A','C#','E']):'AM',
    frozenset(['A','C','E']):'Am',
    frozenset(['A','C','D#']):'Ad',
    frozenset(['A#','D','F']):'A#M',
	frozenset(['A#','C#','F']):'A#m', 
    frozenset(['A#','C','E']):'A#d',
    frozenset(['B','D#','F#']):'BM',
    frozenset(['B','D','F#']):'Bm',
	frozenset(['B','D','F']):'Bd', 
    frozenset(['A','A','A']):'AM',
    frozenset(['A#','A#','A#']):'A#M',
    frozenset(['B','B','B']):'BM',
    frozenset(['C','C','C']):'CM',
    frozenset(['C#','C#','C#']):'C#M',
    frozenset(['D','D','D']):'DM',
    frozenset(['D#','D#','D#']):'D#M',
    frozenset(['E','E','E']):'EM',
    frozenset(['F','F','F']):'FM',
    frozenset(['F#','F#','F#']):'F#M',
    frozenset(['G','G','G']):'GM',
    frozenset(['G#','G#','G#']):'G#M',
    frozenset(['A','A','E']):'AM',
    frozenset(['A#','A#','F']):'A#M',
    frozenset(['B','B','F#']):'BM',
    frozenset(['C','C','G']):'CM',
    frozenset(['C#','C#','G#']):'C#M',
    frozenset(['D','D','A']):'DM',
    frozenset(['D#','D#','A#']):'D#M',
    frozenset(['E','E','B']):'EM',
    frozenset(['F','F','C']):'FM',
    frozenset(['F#','F#','C#']):'F#M',
    frozenset(['G','G','D']):'GM',
    frozenset(['G#','G#','D#']):'G#M',
    frozenset(['A','A','C#']):'AM',
    frozenset(['A','A','C']):'Am',
    frozenset(['A#','A#','D']):'A#M',
    frozenset(['A#','A#','C#']):'A#m',
    frozenset(['B','B','D#']):'BM',
    frozenset(['B','B','D']):'Bm',
    frozenset(['C','C','E']):'CM',
    frozenset(['C','C','D#']):'Cm',
    frozenset(['C#','C#','F']):'C#M',
    frozenset(['C#','C#','E']):'C#m',
    frozenset(['D','D','F#']):'DM',
    frozenset(['D','D','F']):'Dm',
    frozenset(['D#','D#','G']):'D#M',
    frozenset(['D#','D#','F#']):'D#m',
    frozenset(['E','E','G#']):'EM',
    frozenset(['E','E','G']):'Em',
    frozenset(['F','F','A']):'FM',
    frozenset(['F','F','G#']):'Fm',
    frozenset(['F#','F#','A#']):'F#M',
    frozenset(['F#','F#','A']):'F#m',
    frozenset(['G','G','B']):'GM',
    frozenset(['G','G','A#']):'Gm',
    frozenset(['G#','G#','C']):'G#M',
    frozenset(['G#','G#','B']):'G#m',
    }

harmonicos_medios = (1,-2.49211,-4.12197,-6.36542,-6.25719,-7.49675,
                     -7.69567,-9.26978,-8.94704,-9.7248,-9.95047,
                     -10.1035,-11.2435,-12.413,-13.1692,-13.6776,
                     -15.1513,-16.0201,-16.5112,-16.9168 , -17.4663,
                     -18.5106, -18.7082, -18.7753, -19.2537,
                     -19.7006, -20.116, -19.9884, -20.6929, -20.1128,
                     -21.8898, -21.5211, -22.6679,-22.8656, -23.2739,
                     -25.2512, -25.3359, -26.2105, -27.1334, -27.3785,
                     -29.2297, -29.6742, -29.6742, -30.2306,
                     -30.8659, -31.247, -32.5626, -32.8658, -33.1618,
                     -33.9285, -34.8408, -35.5584, -35.7774, -36.5521,
                     -36.9508, -37.5281, -38.2605, -39.0375, -39.0979,
                     -40.3298, -40.623, -40.9314, -41.336)

max_hz = 4978.03
mt =1.059463094359 #meio tom
qt =1.029302236643 #um quarto de tom
C0 = 16.35 #um C0 em Hz
vetornotas = ['C','C#','D','D#',"E","F","F#","G","G#","A", "A#", "B",None]
vetoracordes=['DM', 'A#d', 'G#M', 'A#m', 'C#m', 'C#d', 'FM', 'Bd', 'Dm', 'Bm', 'Dd', 'A#M', 'C#M', 'Fd', 'BM', 'Fm', 'EM', 'D#M', 'G#d', 'CM', 'AM', 'G#m', 'GM', 'F#M', 'Em', 'D#m', 'Ad', 'Cm', 'Ed', 'D#d', 'Am', 'Cd', 'Gd', 'F#d', 'Gm', 'F#m','nao']

PATH_ESPECTROS='espectros/'
